<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>


</head>

<body>
  <ul id="container">

  </ul>

  <script>
    let now = Date.now()
    let ul = document.getElementById('container')

    let total = 100000
    for (let i = 0; i < total; i++) {
      let li = document.createElement('li')
      li.innerHTML = ~~(Math.random() * total)
      ul.appendChild(li)
    }

    console.log('js执行时间', Date.now() - now);

  </script>
</body>

</html>